<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  
  <title>linux docker安装skywalking | 清峰小栈</title>
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  
  <meta name="keywords" content="skywalking" />
  
  
  
  
  <meta name="description" content="Skywalking + ES + Docker 搭建 elasticsearch集群 及 kibana https:&#x2F;&#x2F;blog.csdn.net&#x2F;qq_43692950&#x2F;article&#x2F;details&#x2F;122834930  Skywalking详细解读参考：Skywalking应用实战 Agent探针、Rocketbot以及告警 https:&#x2F;&#x2F;www.cnblogs.com&#x2F;jiagoous">
<meta property="og:type" content="article">
<meta property="og:title" content="Linux docker安装skywalking">
<meta property="og:url" content="http://example.com/2022/05/30/%E8%BF%90%E7%BB%B4%E5%AE%89%E8%A3%85/Linux%20docker%E5%AE%89%E8%A3%85skywalking/index.html">
<meta property="og:site_name" content="清峰小栈">
<meta property="og:description" content="Skywalking + ES + Docker 搭建 elasticsearch集群 及 kibana https:&#x2F;&#x2F;blog.csdn.net&#x2F;qq_43692950&#x2F;article&#x2F;details&#x2F;122834930  Skywalking详细解读参考：Skywalking应用实战 Agent探针、Rocketbot以及告警 https:&#x2F;&#x2F;www.cnblogs.com&#x2F;jiagoous">
<meta property="og:locale" content="en_US">
<meta property="og:image" content="http://img.lindaifeng.vip/typora-picgo-tuchaung/20221107090552.png">
<meta property="og:image" content="http://img.lindaifeng.vip/typora-picgo-tuchaung/20221107090558.png">
<meta property="og:image" content="http://img.lindaifeng.vip/typora-picgo-tuchaung/20221107090606.png">
<meta property="og:image" content="http://img.lindaifeng.vip/typora-picgo-tuchaung/20221107090613.png">
<meta property="og:image" content="http://img.lindaifeng.vip/typora-picgo-tuchaung/20221107090621.png">
<meta property="og:image" content="http://img.lindaifeng.vip/typora-picgo-tuchaung/20221107090629.png">
<meta property="og:image" content="http://img.lindaifeng.vip/typora-picgo-tuchaung/20221107090644.png">
<meta property="og:image" content="http://img.lindaifeng.vip/typora-picgo-tuchaung/20221107090650.png">
<meta property="og:image" content="http://img.lindaifeng.vip/typora-picgo-tuchaung/20221107090657.png">
<meta property="og:image" content="http://img.lindaifeng.vip/typora-picgo-tuchaung/20221107090703.png">
<meta property="article:published_time" content="2022-05-30T08:25:35.140Z">
<meta property="article:modified_time" content="2023-05-04T00:46:41.970Z">
<meta property="article:author" content="清峰">
<meta property="article:tag" content="skywalking">
<meta name="twitter:card" content="summary">
<meta name="twitter:image" content="http://img.lindaifeng.vip/typora-picgo-tuchaung/20221107090552.png">
  

  

  <link rel="icon" href="/qingfeng-blog/css/images/mylogo-2.png">
  <link rel="apple-touch-icon" href="/qingfeng-blog/css/images/mylogo-2.png">
  
    <link href="//fonts.googleapis.com/css?family=Source+Code+Pro" rel="stylesheet" type="text/css">
  
  <link href="https://fonts.googleapis.com/css?family=Open+Sans|Montserrat:700" rel="stylesheet" type="text/css">
  <link href="https://fonts.googleapis.com/css?family=Roboto:400,300,300italic,400italic" rel="stylesheet" type="text/css">
  <!-- <link href="//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css" rel="stylesheet"> -->
  <link href="/qingfeng-blog/css/font-awesome.css" rel="stylesheet">
  <style type="text/css">
    @font-face{font-family:futura-pt; src:url("/qingfeng-blog/css/fonts/FuturaPTBold.otf") format("woff");font-weight:500;font-style:normal;}
    @font-face{font-family:futura-pt-light; src:url("/qingfeng-blog/css/fonts/FuturaPTBook.otf") format("woff");font-weight:lighter;font-style:normal;}
    @font-face{font-family:futura-pt-italic; src:url("/qingfeng-blog/css/fonts/FuturaPTBookOblique.otf") format("woff");font-weight:400;font-style:italic;}
}

  </style>
  
<link rel="stylesheet" href="/qingfeng-blog/css/style.css">


  
<script src="/qingfeng-blog/js/jquery-3.1.1.min.js"></script>

  
<script src="/qingfeng-blog/js/bootstrap.js"></script>


  <!-- Bootstrap core CSS -->
  <link rel="stylesheet" href="/qingfeng-blog/css/bootstrap.css" >

  
    
<link rel="stylesheet" href="/qingfeng-blog/css/dialog.css">

  

  

  
    <link rel="stylesheet" href="/qingfeng-blog/css/header-post.css" >
  

  
  
  
    <link rel="stylesheet" href="/qingfeng-blog/css/vdonate.css" >
  

<meta name="generator" content="Hexo 6.3.0"></head>



  <body data-spy="scroll" data-target="#toc" data-offset="50">


  
  <div id="container">
    <div id="wrap">
      
        <header>

    <div id="allheader" class="navbar navbar-default navbar-static-top" role="navigation">
        <div class="navbar-inner">
          
          <div class="container"> 
            <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
              <span class="sr-only">Toggle navigation</span>
              <span class="icon-bar"></span>
              <span class="icon-bar"></span>
              <span class="icon-bar"></span>
            </button>

            
              <a class="brand" style="
                 border-width: 0px;  margin-top: 0px;"  
                href="#" data-toggle="modal" data-target="#myModal" >
                  <img width="155px" height="90px" alt="Hike News" src="/qingfeng-blog/css/images/mylogo-2.png">
              </a>
            
            
            <div class="navbar-collapse collapse">
              <ul class="hnav navbar-nav">
                
                  <li> <a class="main-nav-link" href="/qingfeng-blog/">首页</a> </li>
                
                  <li> <a class="main-nav-link" href="/qingfeng-blog/categories">分类</a> </li>
                
                  <li> <a class="main-nav-link" href="/qingfeng-blog/tags">标签</a> </li>
                
                  <li><div id="search-form-wrap">

    <form class="search-form">
        <input type="text" class="ins-search-input search-form-input" placeholder="" />
        <button type="submit" class="search-form-submit"></button>
    </form>
    <div class="ins-search">
    <div class="ins-search-mask"></div>
    <div class="ins-search-container">
        <div class="ins-input-wrapper">
            <input type="text" class="ins-search-input" placeholder="Type something..." />
            <span class="ins-close ins-selectable"><i class="fa fa-times-circle"></i></span>
        </div>
        <div class="ins-section-wrapper">
            <div class="ins-section-container"></div>
        </div>
    </div>
</div>
<script>
(function (window) {
    var INSIGHT_CONFIG = {
        TRANSLATION: {
            POSTS: 'Posts',
            PAGES: 'Pages',
            CATEGORIES: 'Categories',
            TAGS: 'Tags',
            UNTITLED: '(Untitled)',
        },
        ROOT_URL: '/qingfeng-blog/',
        CONTENT_URL: '/qingfeng-blog/content.json',
    };
    window.INSIGHT_CONFIG = INSIGHT_CONFIG;
})(window);
</script>

<script src="/qingfeng-blog/js/insight.js"></script>


</div></li>
            </div>
          </div>
                
      </div>
    </div>

</header>



      
            
      <div id="content" class="outer">
        
          <section id="main" style="float:none;"><article id="post-运维安装/Linux docker安装skywalking" style="width: 75%; float:left;" class="article article-type-post" itemscope itemprop="blogPost" >
<div id="container">
  <div id="articleInner" class="article-inner">
    
    
      <header class="article-header">
        
  
    <h1 class="thumb" class="article-title" itemprop="name">
      Linux docker安装skywalking
    </h1>
  

      </header>
    
    <div class="article-meta">
      
	<a href="/qingfeng-blog/2022/05/30/%E8%BF%90%E7%BB%B4%E5%AE%89%E8%A3%85/Linux%20docker%E5%AE%89%E8%A3%85skywalking/" class="article-date">
	  <time datetime="2022-05-30T08:25:35.140Z" itemprop="datePublished">2022-05-30</time>
	</a>

      
    <a class="article-category-link" href="/qingfeng-blog/categories/Docker/">Docker</a>

      
	<a class="article-views">
	<span id="busuanzi_container_page_pv">
		PV:<span id="busuanzi_value_page_pv"></span>
	</span>
	</a>

      

    </div>
    <div class="article-entry" itemprop="articleBody">
      
        <h1 id="Skywalking-ES-Docker"><a href="#Skywalking-ES-Docker" class="headerlink" title="Skywalking + ES + Docker"></a>Skywalking + ES + Docker</h1><blockquote>
<p>搭建 elasticsearch集群 及 kibana</p>
<p><a target="_blank" rel="noopener" href="https://blog.csdn.net/qq_43692950/article/details/122834930">https://blog.csdn.net/qq_43692950/article/details/122834930</a></p>
</blockquote>
<p>Skywalking详细解读参考：<a target="_blank" rel="noopener" href="https://www.cnblogs.com/jiagooushi/p/16381838.html">Skywalking应用实战 Agent探针、Rocketbot以及告警</a></p>
<p><a target="_blank" rel="noopener" href="https://www.cnblogs.com/jiagooushi/archive/2022/06/16/16381838.html">https://www.cnblogs.com/jiagooushi/archive/2022/06/16/16381838.html</a></p>
<blockquote>
<p>Skywalking跟ES版本需要适配</p>
<p>比如目前我用的版本是：</p>
<p><strong>版本对应关系</strong></p>
<p>apache&#x2F;skywalking-ui:8.6.0</p>
<p>apache&#x2F;skywalking-oap-server:8.6.0</p>
<p>#agent:8.6.0不能用没有字体库，某些业务场景下会报错</p>
<p>apache&#x2F;skywalking-java-agent:8.6.0</p>
<p><strong>方案一：</strong></p>
<p>#升级版本</p>
<p>apache&#x2F;skywalking-java-agent:8.9.0-java8</p>
<p><strong>方案二：</strong></p>
<p>#自定义镜像，源码编译agent:8.6.0将orecleJDK打进去</p>
</blockquote>
<h1 id="skywalking-组件关系及部署"><a href="#skywalking-组件关系及部署" class="headerlink" title="skywalking 组件关系及部署"></a>skywalking 组件关系及部署</h1><h3 id="1、skywalking由三个部分组成"><a href="#1、skywalking由三个部分组成" class="headerlink" title="1、skywalking由三个部分组成"></a>1、skywalking由三个部分组成</h3><figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">skywalking-collector:链路数据归集器，数据可以落地ElasticSearch/H2</span><br><span class="line">skywalking-ui:web可视化平台，用来展示落地的数据</span><br><span class="line">skywalking-agent:探针，用来收集和发送数据到归集器</span><br></pre></td></tr></table></figure>

<h3 id="2、配置关系"><a href="#2、配置关系" class="headerlink" title="2、配置关系"></a>2、配置关系</h3><figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">1, skywalking-oap 有两个端口暴露</span><br><span class="line">2, 11800 ：grpc协议  用于agent上传数据</span><br><span class="line">3, 12800 ：rset协议  用于与skywalking-ui通信，skywalking-ui配置SW_OAP_ADDRESS时 要注意填写12800端口</span><br></pre></td></tr></table></figure>

<h3 id="一、kubesphere创建oap"><a href="#一、kubesphere创建oap" class="headerlink" title="一、kubesphere创建oap"></a>一、kubesphere创建oap</h3><p>创建无状态服务</p>
<h4 id="1、填写镜像路径"><a href="#1、填写镜像路径" class="headerlink" title="1、填写镜像路径"></a>1、填写镜像路径</h4><h4 id="2、使用默认端口"><a href="#2、使用默认端口" class="headerlink" title="2、使用默认端口"></a>2、使用默认端口</h4><p><img src="http://img.lindaifeng.vip/typora-picgo-tuchaung/20221107090552.png" alt="image-20220826100411131"></p>
<h4 id="3、填写环境变量-设置数据源"><a href="#3、填写环境变量-设置数据源" class="headerlink" title="3、填写环境变量,设置数据源"></a>3、填写环境变量,设置数据源</h4><p>选择es数据源（不设置收集的数据源默认保存至h2数据库）</p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line">env:</span><br><span class="line">- name: JVM</span><br><span class="line">value: &#x27;-Xms256m -Xmx256m&#x27;</span><br><span class="line">- name: SW_STORAGE</span><br><span class="line">value: elasticsearch7</span><br><span class="line">- name: SW_STORAGE_ES_CLUSTER_NODES</span><br><span class="line">value: &#x27;xxx.xxx.xxx:9200&#x27;</span><br></pre></td></tr></table></figure>

<p><img src="http://img.lindaifeng.vip/typora-picgo-tuchaung/20221107090558.png" alt="image-20220902173454914"></p>
<h3 id="二、kubesphere创建UI"><a href="#二、kubesphere创建UI" class="headerlink" title="二、kubesphere创建UI"></a>二、kubesphere创建UI</h3><h4 id="1、填写镜像路径-1"><a href="#1、填写镜像路径-1" class="headerlink" title="1、填写镜像路径"></a>1、填写镜像路径</h4><h4 id="2、使用默认端口-1"><a href="#2、使用默认端口-1" class="headerlink" title="2、使用默认端口"></a>2、使用默认端口</h4><h4 id="3、填写环境变量-连接oap"><a href="#3、填写环境变量-连接oap" class="headerlink" title="3、填写环境变量,连接oap"></a>3、填写环境变量,连接oap</h4><p>oap的dns地址</p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">//oap连接服务端口：12800</span><br><span class="line">SW_OAP_ADDRESS:skywalking-oap-server.test5:12800</span><br></pre></td></tr></table></figure>

<p><img src="http://img.lindaifeng.vip/typora-picgo-tuchaung/20221107090606.png" alt="image-20220826154758399"></p>
<p><img src="http://img.lindaifeng.vip/typora-picgo-tuchaung/20221107090613.png" alt="image-20220826140418379"></p>
<h4 id="4、访问页面："><a href="#4、访问页面：" class="headerlink" title="4、访问页面："></a>4、访问页面：</h4><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">ip+端口8080</span><br></pre></td></tr></table></figure>

<p>skywalking懒加载，初次访问时，看不到监控数据，需要访问服务接口后，skywalking才会加载数据</p>
<h3 id="三、项目配置"><a href="#三、项目配置" class="headerlink" title="三、项目配置"></a>三、项目配置</h3><p>dockfile文件基础镜像使用skywalking-jdk</p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br></pre></td><td class="code"><pre><span class="line">#设置镜像基础，jdk8</span><br><span class="line">#FROM java:8</span><br><span class="line">FROM xxx.xxx.xxx.xxx:8080/common/skywalking-java-agent:8.6.0-jdk8-me</span><br><span class="line">#维护人员信息</span><br><span class="line">MAINTAINER hetao</span><br><span class="line">#设置镜像对外暴露端口</span><br><span class="line">EXPOSE 10013</span><br><span class="line">ENV TZ=PRC</span><br><span class="line">RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime &amp;&amp; echo $TZ &gt; /etc/timezone</span><br><span class="line">#将当前 target 目录下的 jar 放置在根目录下，命名为 app.jar，推荐使用绝对路径。</span><br><span class="line">ADD target/devops-sign.jar /devops-sign.jar</span><br><span class="line">#执行启动命令</span><br><span class="line">ENTRYPOINT java $&#123;JVM:=-Xms2048m -Xmx2048m&#125; -Djava.security.egd=file:/dev/./urandom -jar /devops-sign.jar</span><br></pre></td></tr></table></figure>

<p>项目yml文件中配置oap环境变量-连接skywalking</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br></pre></td><td class="code"><pre><span class="line"><span class="meta prompt_"># </span><span class="language-bash">配置oap连接地址</span></span><br><span class="line">- name: SW_AGENT_COLLECTOR_BACKEND_SERVICES</span><br><span class="line">value: &#x27;skywalking-oap-server.test5:11800&#x27;</span><br><span class="line"><span class="meta prompt_"># </span><span class="language-bash">配置服务名称</span></span><br><span class="line">- name: SW_AGENT_NAME</span><br><span class="line">value: devops-cloud-gateway</span><br></pre></td></tr></table></figure>

<p><img src="http://img.lindaifeng.vip/typora-picgo-tuchaung/20221107090621.png" alt="image-20220826163627042"></p>
<h3 id="四、自定义镜像"><a href="#四、自定义镜像" class="headerlink" title="四、自定义镜像"></a>四、自定义镜像</h3><p>在项目接入中遇到问题二，抛弃官方提供的镜像，选择自定义skywalking-agent镜像</p>
<h4 id="1、下载对应版本skywalking-agent"><a href="#1、下载对应版本skywalking-agent" class="headerlink" title="1、下载对应版本skywalking-agent"></a><strong>1、下载对应版本skywalking-agent</strong></h4><h4 id="2-、编写Dockerfile"><a href="#2-、编写Dockerfile" class="headerlink" title="2.、编写Dockerfile"></a><strong>2.、编写Dockerfile</strong></h4><p><strong>方法一：通过源码编译agent</strong></p>
<figure class="highlight dockerfile"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br></pre></td><td class="code"><pre><span class="line">//Dockerfile</span><br><span class="line"><span class="comment">#OracleJDK1.8基础镜像</span></span><br><span class="line"><span class="keyword">FROM</span> java:<span class="number">8</span></span><br><span class="line"><span class="comment">#将编译构建得到的jar文件复制到镜像空间中</span></span><br><span class="line"><span class="keyword">COPY</span><span class="language-bash"> agent/ /skywalking/agent/</span></span><br><span class="line"><span class="comment">#执行工作目录</span></span><br><span class="line"><span class="keyword">WORKDIR</span><span class="language-bash"> /</span></span><br><span class="line"><span class="comment">#skywalking-agent环境变量,指定jar路径</span></span><br><span class="line"><span class="keyword">ENV</span> JAVA_TOOL_OPTIONS=-javaagent:/skywalking/agent/skywalking-agent.jar</span><br></pre></td></tr></table></figure>

<p><strong>方法二：通过基础镜像base引用agent目录</strong>(项目中用workflow有点问题)</p>
<figure class="highlight dockerfile"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">#定义skywalking-base基础镜像版本</span></span><br><span class="line"><span class="keyword">ARG</span> version=<span class="string">&#x27;8.6.0&#x27;</span></span><br><span class="line"><span class="comment">#定义jdk基础镜像版本</span></span><br><span class="line"><span class="keyword">ARG</span> BASE_IMAGE=<span class="string">&#x27;java:8&#x27;</span></span><br><span class="line"><span class="comment">#skywalking-base基础镜像引用</span></span><br><span class="line"><span class="keyword">FROM</span> apache/skywalking-base:$&#123;version&#125;-es7 AS build</span><br><span class="line"><span class="comment">#jdk基础镜像引用</span></span><br><span class="line"><span class="keyword">FROM</span> $BASE_IMAGE</span><br><span class="line"><span class="comment">#作者</span></span><br><span class="line"><span class="keyword">LABEL</span><span class="language-bash"> maintainer=<span class="string">&quot;ldf&quot;</span></span></span><br><span class="line"><span class="comment">#skywalking-agent环境变量,指定jar路径</span></span><br><span class="line"><span class="keyword">ENV</span> JAVA_TOOL_OPTIONS=-javaagent:/skywalking/agent/skywalking-agent.jar</span><br><span class="line"><span class="comment">#指定工作目录</span></span><br><span class="line"><span class="keyword">WORKDIR</span><span class="language-bash"> /skywalking</span></span><br><span class="line"><span class="comment">#添加文件,添加引用镜像中的agent目录到自定义镜像工作空间中</span></span><br><span class="line"><span class="keyword">COPY</span><span class="language-bash"> --from=build /skywalking/agent /skywalking/agent</span></span><br></pre></td></tr></table></figure>

<h4 id="3、构建自定义镜像"><a href="#3、构建自定义镜像" class="headerlink" title="3、构建自定义镜像"></a><strong>3、构建自定义镜像</strong></h4><figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line"><span class="meta prompt_">#</span><span class="language-bash">打包镜像文件</span></span><br><span class="line">docker build -t skywalking-java-agent:8.6.0-java8-me -f Dockerfile .</span><br></pre></td></tr></table></figure>

<p><strong>启动项目后出现下图中找到agent.config配置文件即接入成功。</strong></p>
<p><img src="http://img.lindaifeng.vip/typora-picgo-tuchaung/20221107090629.png" alt="image-20220902145433470"></p>
<h3 id="五、问题说明："><a href="#五、问题说明：" class="headerlink" title="五、问题说明："></a>五、问题说明：</h3><h5 id="问题一"><a href="#问题一" class="headerlink" title="问题一"></a><strong>问题一</strong></h5><blockquote>
<p><a target="_blank" rel="noopener" href="https://so.csdn.net/so/search?q=docker&spm=1001.2101.3001.7020">docker</a> 部署skywalking时，一直报错：<code>no provider found for module storage</code></p>
<h6 id="原因分析："><a href="#原因分析：" class="headerlink" title="原因分析："></a><strong>原因分析：</strong></h6><ol>
<li>skywalking 8.8之前不能自动感知存储源是什么，需要手动指定是es6还是7；</li>
<li>8.8之后可以自动感知存储源的版本，不需要手动指定es6还是7，直接写es即可；</li>
</ol>
<p><strong>解决方案：</strong></p>
<p>将环境变量指定数据源：SW_STORAGE&#x3D;elasticsearch7<code>改为</code>SW_STORAGE&#x3D;elasticsearch&#96;</p>
</blockquote>
<h5 id="问题二"><a href="#问题二" class="headerlink" title="问题二"></a><strong>问题二</strong></h5><blockquote>
<h5 id="JDK字体类初始化异常问题：java-lang-NoClassDefFoundError-Could-not-initialize-class-sun-font-SunFontManager"><a href="#JDK字体类初始化异常问题：java-lang-NoClassDefFoundError-Could-not-initialize-class-sun-font-SunFontManager" class="headerlink" title="JDK字体类初始化异常问题：java.lang.NoClassDefFoundError: Could not initialize class sun.font.SunFontManager"></a>JDK字体类初始化异常问题：java.lang.NoClassDefFoundError: Could not initialize class sun.font.SunFontManager</h5><p><strong>原因分析：</strong></p>
<p>skywalking官方提供的agent镜像中jdk采用的是OpenJDK，而OpenJDK在1.7之后不包含字体库，在poi导出业务中存在报这种错误</p>
<p>OpenJDK比OracleJDK简化了一些功能，openjdk不包含字体库</p>
<p><strong>解决方案：</strong></p>
<p>方法1、有网的环境下把OpenJDK打包成包含fontconfig和字体 ttf-dejavu的镜像</p>
<p>方法2、升级jdk版本，jdk “1.8.0_332” 请升级成 jdk “1.8.0_333” 或更高的版本</p>
<p>以上方法由互联网提供，以下是我自己的实践的方案</p>
<p>1、通过源码编译agent，将OracleJDK打入agent镜像中</p>
<p>或者</p>
<p>2、通过基础镜像base引用agent目录，将OracleJDK打入agent镜像中</p>
</blockquote>
<h5 id="问题三"><a href="#问题三" class="headerlink" title="问题三"></a><strong>问题三</strong></h5><blockquote>
<p><strong>超出了GC开销限制：</strong>java.lang.OutOfMemoryError: GC overhead limit exceeded｜ java.lang.OutOfMemoryError: Java heap space</p>
<p><strong>原因分析：</strong></p>
<p>这个是JDK6新添的错误类型。是发生在GC占用大量时间为释放很小空间的时候发生的，是一种保护机制。一般是因为堆太小，导致异常的原因：没有足够的<a target="_blank" rel="noopener" href="https://so.csdn.net/so/search?q=%E5%86%85%E5%AD%98&spm=1001.2101.3001.7020">内存</a>。 </p>
<p>Sun 官方对此的定义：超过98%的时间用来做GC并且回收了不到2%的堆内存时会抛出此异常。</p>
<p><strong>解决方案</strong>：</p>
<p>方法1，查看项目中是否有大量的死循环或有使用大内存的代码，优化代码。</p>
<p>方法2，JVM给出这样一个参数：-XX:-UseGCOverheadLimit  禁用这个检查，其实这个参数解决不了内存问题，只是把错误的信息延后，替换成 java.lang.OutOfMemoryError: Java heap space。</p>
<p>方法3，增大堆内存 set JAVA_OPTS&#x3D;-server -Xms512m -Xmx1024m -XX:MaxNewSize&#x3D;1024m -XX:MaxPermSize&#x3D;1024m</p>
<p>我采用 增大堆内存的方式将原来的内存增加到了512</p>
<p>env:</p>
<p>name: JVM<br>value: ‘-Xms512m -Xmx512m’</p>
</blockquote>
<h5 id="问题四"><a href="#问题四" class="headerlink" title="问题四"></a><strong>问题四</strong></h5><blockquote>
<p>1、agent的plugins目录是已启用的插件，optional-plugins目录中是可选的插件。</p>
<p>plugins中默认没有springcloud getway插件，不支持监控springcloud gateway网关服务。</p>
<p>如果当前要部署的服务是springcloud getway网关服务，需要把optional-plugins中的apm-spring-cloud-gateway-2.1.x-plugin-8.2.0.jar拷贝到plugins中。</p>
</blockquote>
<h5 id="kubesphere安装-es配置文件"><a href="#kubesphere安装-es配置文件" class="headerlink" title="kubesphere安装|es配置文件"></a><strong>kubesphere安装|es配置文件</strong></h5><figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br></pre></td><td class="code"><pre><span class="line"><span class="meta prompt_">#</span><span class="language-bash">es配置文件</span></span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">集群名称配置</span></span><br><span class="line"> cluster.name: my-es</span><br><span class="line"><span class="meta prompt_"> #</span><span class="language-bash">节点角色配置</span></span><br><span class="line"><span class="meta prompt_"> #</span><span class="language-bash">node.roles: [ data, master ]</span></span><br><span class="line"><span class="meta prompt_"> #</span><span class="language-bash">网络配置</span></span><br><span class="line"> network.host: 0.0.0.0</span><br><span class="line"><span class="meta prompt_"> #</span><span class="language-bash">集群节点配置</span></span><br><span class="line"> discovery.type: single-node</span><br><span class="line"><span class="meta prompt_"> #</span><span class="language-bash">discovery.seed_hosts: [ <span class="string">&quot;app-es-v1-0.app-es.app.svc.cluster.local:9300&quot;</span> ]</span></span><br><span class="line"><span class="meta prompt_"> #</span><span class="language-bash">集群初始化节点</span></span><br><span class="line"><span class="meta prompt_"> #</span><span class="language-bash">cluster.initial_master_nodes: [ <span class="string">&quot;app-es-v1-0&quot;</span>]</span></span><br><span class="line"><span class="meta prompt_"> #</span><span class="language-bash">绑定客户端访问端口</span></span><br><span class="line"> http.port: 9200</span><br><span class="line"><span class="meta prompt_"> #</span><span class="language-bash">绑定集群间通信端口</span></span><br><span class="line"> transport.port: 9300</span><br><span class="line"><span class="meta prompt_"> #</span><span class="language-bash">安全访问</span></span><br><span class="line"> xpack.security.enabled: false</span><br><span class="line"> xpack.security.transport.ssl.enabled: false</span><br><span class="line"><span class="meta prompt_"> #</span><span class="language-bash">认证</span></span><br><span class="line"> http.cors.allow-origin: &quot;*&quot;</span><br><span class="line"> http.cors.enabled: true</span><br><span class="line"> http.max_content_length: 200mb</span><br></pre></td></tr></table></figure>





<h2 id="Skywalking操作说明"><a href="#Skywalking操作说明" class="headerlink" title="Skywalking操作说明"></a>Skywalking操作说明</h2><p>SkyWalking 逻辑上分为四部分: 探针, 平台后端, 存储和用户界面。</p>
<blockquote>
<p>探针skywalking-agent收集数据上报给平台后端</p>
<p>平台后端skywalking-oap存储相关数据</p>
<p>用户界面skywalking-ui连接平台后端查询数据展示</p>
</blockquote>
<p><strong>操作说明：</strong></p>
<h2 id="1、访问skywalking-ui面板"><a href="#1、访问skywalking-ui面板" class="headerlink" title="1、访问skywalking-ui面板"></a>1、访问skywalking-ui面板</h2><p>skywalking属于懒加载，第一次访问不会有数据视图，访问接口后产生相应的数据视图</p>
<p>目前启动了三个服务，可选择相应服务查看对应系统图</p>
<p><strong>仪表盘：查看服务系统性能</strong></p>
<p><img src="http://img.lindaifeng.vip/typora-picgo-tuchaung/20221107090644.png" alt="image-20220804123724252"></p>
<p><strong>拓扑图</strong>：系统关联关系结构</p>
<p><img src="http://img.lindaifeng.vip/typora-picgo-tuchaung/20221107090650.png" alt="image-20220804124051725"></p>
<p><strong>链路追踪：接口生命周期跟踪</strong></p>
<p><img src="http://img.lindaifeng.vip/typora-picgo-tuchaung/20221107090657.png" alt="image-20220804124349974"></p>
<h2 id="2、访问演示接口"><a href="#2、访问演示接口" class="headerlink" title="2、访问演示接口"></a>2、访问演示接口</h2><p>POST 192.168.x.x:31368&#x2F;system&#x2F;sysLogin<br>{<br>    “userName”: “admin”,<br>    “password”: “ZZ2022!!”,<br>    “date”: 1651146995000<br>}</p>
<p>GET  192.168.x.x:31368&#x2F;system&#x2F;user&#x2F;listPage</p>
<p>访问后等一小会待数据加载完毕，视图出现，</p>
<p>按时间范围查询接口</p>
<p>接入skywalking</p>
<p>1、下载包</p>
<p>2、编辑配置文件设置存储方式</p>
<p>3、运行访问ui控制台</p>
<p>4、导入jar到项目中（本地可直接引用下载包中的jar）</p>
<p><img src="http://img.lindaifeng.vip/typora-picgo-tuchaung/20221107090703.png" alt="image-20220804124637278"></p>
<h2 id="日志接入"><a href="#日志接入" class="headerlink" title="日志接入"></a>日志接入</h2><p>导入依赖</p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br></pre></td><td class="code"><pre><span class="line">&lt;!-- skywalking--&gt;</span><br><span class="line">&lt;dependency&gt;</span><br><span class="line">    &lt;groupId&gt;org.apache.skywalking&lt;/groupId&gt;</span><br><span class="line">    &lt;artifactId&gt;apm-toolkit-logback-1.x&lt;/artifactId&gt;</span><br><span class="line">    &lt;version&gt;8.12.0&lt;/version&gt;</span><br><span class="line">&lt;/dependency&gt;</span><br><span class="line">&lt;dependency&gt;</span><br><span class="line">    &lt;groupId&gt;org.apache.skywalking&lt;/groupId&gt;</span><br><span class="line">    &lt;artifactId&gt;apm-toolkit-logback-1.x&lt;/artifactId&gt;</span><br><span class="line">    &lt;version&gt;8.12.0&lt;/version&gt;</span><br><span class="line">&lt;/dependency&gt;</span><br></pre></td></tr></table></figure>

<p>创建日志文件 logback.xml</p>
<figure class="highlight xml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br></pre></td><td class="code"><pre><span class="line"><span class="meta">&lt;?xml version=<span class="string">&quot;1.0&quot;</span> encoding=<span class="string">&quot;UTF-8&quot;</span> ?&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">configuration</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">jmxConfigurator</span>/&gt;</span></span><br><span class="line">    <span class="comment">&lt;!--    日志打印格式--&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">property</span> <span class="attr">name</span>=<span class="string">&quot;log_pattern&quot;</span></span></span><br><span class="line"><span class="tag">              <span class="attr">value</span>=<span class="string">&quot;%d&#123;yyyy-MM-dd HH:mm:ss.SSS Z&#125; [%tid] [%thread] %-5level %logger&#123;36&#125;:%line - %msg%n&quot;</span>/&gt;</span></span><br><span class="line">    <span class="comment">&lt;!--    控制台日志--&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">appender</span> <span class="attr">name</span>=<span class="string">&quot;STDOUT&quot;</span> <span class="attr">class</span>=<span class="string">&quot;ch.qos.logback.core.ConsoleAppender&quot;</span>&gt;</span></span><br><span class="line">        <span class="tag">&lt;<span class="name">encoder</span> <span class="attr">class</span>=<span class="string">&quot;ch.qos.logback.core.encoder.LayoutWrappingEncoder&quot;</span>&gt;</span></span><br><span class="line">            <span class="tag">&lt;<span class="name">layout</span> <span class="attr">class</span>=<span class="string">&quot;org.apache.skywalking.apm.toolkit.log.logback.v1.x.TraceIdPatternLogbackLayout&quot;</span>&gt;</span></span><br><span class="line">                <span class="tag">&lt;<span class="name">pattern</span>&gt;</span>$&#123;log_pattern&#125;<span class="tag">&lt;/<span class="name">pattern</span>&gt;</span></span><br><span class="line">            <span class="tag">&lt;/<span class="name">layout</span>&gt;</span></span><br><span class="line">        <span class="tag">&lt;/<span class="name">encoder</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;/<span class="name">appender</span>&gt;</span></span><br><span class="line">    <span class="comment">&lt;!--    文件日志--&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">appender</span> <span class="attr">name</span>=<span class="string">&quot;FILE&quot;</span> <span class="attr">class</span>=<span class="string">&quot;ch.qos.logback.core.rolling.RollingFileAppender&quot;</span>&gt;</span></span><br><span class="line">        <span class="tag">&lt;<span class="name">rollingPolicy</span> <span class="attr">class</span>=<span class="string">&quot;ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy&quot;</span>&gt;</span></span><br><span class="line">            <span class="tag">&lt;<span class="name">fileNamePattern</span>&gt;</span>./logs/application/server.%d&#123;yyyy-MM-dd&#125;.%i.log.zip<span class="tag">&lt;/<span class="name">fileNamePattern</span>&gt;</span></span><br><span class="line">            <span class="tag">&lt;<span class="name">maxFileSize</span>&gt;</span>100MB<span class="tag">&lt;/<span class="name">maxFileSize</span>&gt;</span></span><br><span class="line">            <span class="tag">&lt;<span class="name">maxHistory</span>&gt;</span>15<span class="tag">&lt;/<span class="name">maxHistory</span>&gt;</span></span><br><span class="line">            <span class="tag">&lt;<span class="name">totalSizeCap</span>&gt;</span>5GB<span class="tag">&lt;/<span class="name">totalSizeCap</span>&gt;</span></span><br><span class="line">        <span class="tag">&lt;/<span class="name">rollingPolicy</span>&gt;</span></span><br><span class="line">        <span class="tag">&lt;<span class="name">encoder</span> <span class="attr">class</span>=<span class="string">&quot;ch.qos.logback.core.encoder.LayoutWrappingEncoder&quot;</span>&gt;</span></span><br><span class="line">            <span class="tag">&lt;<span class="name">layout</span> <span class="attr">class</span>=<span class="string">&quot;org.apache.skywalking.apm.toolkit.log.logback.v1.x.TraceIdPatternLogbackLayout&quot;</span>&gt;</span></span><br><span class="line">                <span class="tag">&lt;<span class="name">pattern</span>&gt;</span>$&#123;log_pattern&#125;<span class="tag">&lt;/<span class="name">pattern</span>&gt;</span></span><br><span class="line">            <span class="tag">&lt;/<span class="name">layout</span>&gt;</span></span><br><span class="line">        <span class="tag">&lt;/<span class="name">encoder</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;/<span class="name">appender</span>&gt;</span></span><br><span class="line"></span><br><span class="line">    <span class="comment">&lt;!-- skywalking grpc 日志收集 8.4.0版本开始支持 --&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">appender</span> <span class="attr">name</span>=<span class="string">&quot;grpc-log&quot;</span> <span class="attr">class</span>=<span class="string">&quot;org.apache.skywalking.apm.toolkit.log.logback.v1.x.log.GRPCLogClientAppender&quot;</span>&gt;</span></span><br><span class="line">        <span class="tag">&lt;<span class="name">encoder</span> <span class="attr">class</span>=<span class="string">&quot;ch.qos.logback.core.encoder.LayoutWrappingEncoder&quot;</span>&gt;</span></span><br><span class="line">            <span class="tag">&lt;<span class="name">layout</span> <span class="attr">class</span>=<span class="string">&quot;org.apache.skywalking.apm.toolkit.log.logback.v1.x.mdc.TraceIdMDCPatternLogbackLayout&quot;</span>&gt;</span></span><br><span class="line">                <span class="tag">&lt;<span class="name">Pattern</span>&gt;</span>%d&#123;yyyy-MM-dd HH:mm:ss.SSS&#125; [%tid] [%thread] %-5level %logger&#123;36&#125; -%msg%n<span class="tag">&lt;/<span class="name">Pattern</span>&gt;</span></span><br><span class="line">            <span class="tag">&lt;/<span class="name">layout</span>&gt;</span></span><br><span class="line">        <span class="tag">&lt;/<span class="name">encoder</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;/<span class="name">appender</span>&gt;</span></span><br><span class="line"></span><br><span class="line">    <span class="tag">&lt;<span class="name">logger</span> <span class="attr">name</span>=<span class="string">&quot;org.springframework&quot;</span> <span class="attr">additivity</span>=<span class="string">&quot;false&quot;</span>&gt;</span></span><br><span class="line">        <span class="tag">&lt;<span class="name">level</span> <span class="attr">value</span>=<span class="string">&quot;info&quot;</span>/&gt;</span></span><br><span class="line">        <span class="tag">&lt;<span class="name">appender-ref</span> <span class="attr">ref</span>=<span class="string">&quot;STDOUT&quot;</span>/&gt;</span></span><br><span class="line">        <span class="tag">&lt;<span class="name">appender-ref</span> <span class="attr">ref</span>=<span class="string">&quot;FILE&quot;</span>/&gt;</span></span><br><span class="line">        <span class="tag">&lt;<span class="name">appender-ref</span> <span class="attr">ref</span>=<span class="string">&quot;grpc-log&quot;</span>/&gt;</span></span><br><span class="line">    <span class="tag">&lt;/<span class="name">logger</span>&gt;</span></span><br><span class="line"></span><br><span class="line">    <span class="tag">&lt;<span class="name">root</span> <span class="attr">level</span>=<span class="string">&quot;INFO&quot;</span>&gt;</span></span><br><span class="line">        <span class="tag">&lt;<span class="name">appender-ref</span> <span class="attr">ref</span>=<span class="string">&quot;STDOUT&quot;</span>/&gt;</span></span><br><span class="line">        <span class="tag">&lt;<span class="name">appender-ref</span> <span class="attr">ref</span>=<span class="string">&quot;FILE&quot;</span>/&gt;</span></span><br><span class="line">    <span class="tag">&lt;/<span class="name">root</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">configuration</span>&gt;</span></span><br></pre></td></tr></table></figure>

<p>启动项目可看到[TID:xxxxx]即接入成功</p>
<p>访问控制台日中管理中可看到</p>

      
    </div>
    <footer class="article-footer">
      
        <div id="donation_div"></div>


<script src="/qingfeng-blog/js/vdonate.js"></script>

<script>
var a = new Donate({
  title: '如果觉得我的文章对您有用，请随意打赏。您的支持将鼓励我继续创作!', // 可选参数，打赏标题
  btnText: 'Donate', // 可选参数，打赏按钮文字
  el: document.getElementById('donation_div'),
  wechatImage: 'http://img.lindaifeng.vip/typora-picgo-tuchaung/20230428150832.png',
  alipayImage: 'http://img.lindaifeng.vip/typora-picgo-tuchaung/20230428150823.png'
});
</script>
      
      
      <div>
        <ul class="post-copyright">
          <li class="post-copyright-author">
          <strong>Post author:  </strong>清峰</a>
          </li>
          <li class="post-copyright-link">
          <strong>Post link:  </strong>
          <a href="/qingfeng-blog/2022/05/30/运维安装/Linux docker安装skywalking/" target="_blank" title="Linux docker安装skywalking">http://example.com/2022/05/30/运维安装/Linux docker安装skywalking/</a>
          </li>
          <li class="post-copyright-license">
            <strong>Copyright Notice:   </strong>
            All articles in this blog are licensed under <a rel="license" href="https://creativecommons.org/licenses/by-nc-nd/4.0/" target="_blank" title="Attribution-NonCommercial-NoDerivatives 4.0 International (CC BY-NC-ND 4.0)">CC BY-NC-ND 4.0</a>
            unless stating additionally.
          </li>
         
        </ul>
<div>

      
      
        
	<div id="comment">
		<!-- 来必力City版安装代码 -->
		<div id="lv-container" data-id="city" data-uid="MTAyMC8yOTQ4MS82MDQ5">
		<script type="text/javascript">
		   (function(d, s) {
		       var j, e = d.getElementsByTagName(s)[0];

		       if (typeof LivereTower === 'function') { return; }

		       j = d.createElement(s);
		       j.src = 'https://cdn-city.livere.com/js/embed.dist.js';
		       j.async = true;

		       e.parentNode.insertBefore(j, e);
		   })(document, 'script');
		</script>
		<noscript>为正常使用来必力评论功能请激活JavaScript</noscript>
		</div>
		<!-- City版安装代码已完成 -->
	</div>



      
      
        
  <ul class="article-tag-list" itemprop="keywords"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/qingfeng-blog/tags/skywalking/" rel="tag">skywalking</a></li></ul>

      

    </footer>
  </div>
</div>
  
    
<nav id="article-nav">
  
    <a href="/qingfeng-blog/2022/06/15/ELK/Linux%20%E9%85%8D%E7%BD%AEELK%E5%BC%80%E5%90%AF%E8%87%AA%E5%90%AF%E5%8A%A8%E9%85%8D%E7%BD%AE/" id="article-nav-newer" class="article-nav-link-wrap">
      <strong class="article-nav-caption">Newer</strong>
      <div class="article-nav-title">
        
          Linux 配置ELK开启自启动配置
        
      </div>
    </a>
  
  
    <a href="/qingfeng-blog/2022/05/26/%E8%BF%90%E7%BB%B4%E5%AE%89%E8%A3%85/Linux%20%E5%AE%89%E8%A3%85docker/" id="article-nav-older" class="article-nav-link-wrap">
      <strong class="article-nav-caption">Older</strong>
      <div class="article-nav-title">Linux 安装docker</div>
    </a>
  
</nav>

  
</article>

<!-- Table of Contents -->

  <aside id="toc-sidebar">
    <div id="toc" class="toc-article">
    <strong class="toc-title">Contents</strong>
    
        <ol class="nav"><li class="nav-item nav-level-1"><a class="nav-link" href="#Skywalking-ES-Docker"><span class="nav-number">1.</span> <span class="nav-text">Skywalking + ES + Docker</span></a></li><li class="nav-item nav-level-1"><a class="nav-link" href="#skywalking-%E7%BB%84%E4%BB%B6%E5%85%B3%E7%B3%BB%E5%8F%8A%E9%83%A8%E7%BD%B2"><span class="nav-number">2.</span> <span class="nav-text">skywalking 组件关系及部署</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#1%E3%80%81skywalking%E7%94%B1%E4%B8%89%E4%B8%AA%E9%83%A8%E5%88%86%E7%BB%84%E6%88%90"><span class="nav-number">2.0.1.</span> <span class="nav-text">1、skywalking由三个部分组成</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#2%E3%80%81%E9%85%8D%E7%BD%AE%E5%85%B3%E7%B3%BB"><span class="nav-number">2.0.2.</span> <span class="nav-text">2、配置关系</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#%E4%B8%80%E3%80%81kubesphere%E5%88%9B%E5%BB%BAoap"><span class="nav-number">2.0.3.</span> <span class="nav-text">一、kubesphere创建oap</span></a><ol class="nav-child"><li class="nav-item nav-level-4"><a class="nav-link" href="#1%E3%80%81%E5%A1%AB%E5%86%99%E9%95%9C%E5%83%8F%E8%B7%AF%E5%BE%84"><span class="nav-number">2.0.3.1.</span> <span class="nav-text">1、填写镜像路径</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#2%E3%80%81%E4%BD%BF%E7%94%A8%E9%BB%98%E8%AE%A4%E7%AB%AF%E5%8F%A3"><span class="nav-number">2.0.3.2.</span> <span class="nav-text">2、使用默认端口</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#3%E3%80%81%E5%A1%AB%E5%86%99%E7%8E%AF%E5%A2%83%E5%8F%98%E9%87%8F-%E8%AE%BE%E7%BD%AE%E6%95%B0%E6%8D%AE%E6%BA%90"><span class="nav-number">2.0.3.3.</span> <span class="nav-text">3、填写环境变量,设置数据源</span></a></li></ol></li><li class="nav-item nav-level-3"><a class="nav-link" href="#%E4%BA%8C%E3%80%81kubesphere%E5%88%9B%E5%BB%BAUI"><span class="nav-number">2.0.4.</span> <span class="nav-text">二、kubesphere创建UI</span></a><ol class="nav-child"><li class="nav-item nav-level-4"><a class="nav-link" href="#1%E3%80%81%E5%A1%AB%E5%86%99%E9%95%9C%E5%83%8F%E8%B7%AF%E5%BE%84-1"><span class="nav-number">2.0.4.1.</span> <span class="nav-text">1、填写镜像路径</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#2%E3%80%81%E4%BD%BF%E7%94%A8%E9%BB%98%E8%AE%A4%E7%AB%AF%E5%8F%A3-1"><span class="nav-number">2.0.4.2.</span> <span class="nav-text">2、使用默认端口</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#3%E3%80%81%E5%A1%AB%E5%86%99%E7%8E%AF%E5%A2%83%E5%8F%98%E9%87%8F-%E8%BF%9E%E6%8E%A5oap"><span class="nav-number">2.0.4.3.</span> <span class="nav-text">3、填写环境变量,连接oap</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#4%E3%80%81%E8%AE%BF%E9%97%AE%E9%A1%B5%E9%9D%A2%EF%BC%9A"><span class="nav-number">2.0.4.4.</span> <span class="nav-text">4、访问页面：</span></a></li></ol></li><li class="nav-item nav-level-3"><a class="nav-link" href="#%E4%B8%89%E3%80%81%E9%A1%B9%E7%9B%AE%E9%85%8D%E7%BD%AE"><span class="nav-number">2.0.5.</span> <span class="nav-text">三、项目配置</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#%E5%9B%9B%E3%80%81%E8%87%AA%E5%AE%9A%E4%B9%89%E9%95%9C%E5%83%8F"><span class="nav-number">2.0.6.</span> <span class="nav-text">四、自定义镜像</span></a><ol class="nav-child"><li class="nav-item nav-level-4"><a class="nav-link" href="#1%E3%80%81%E4%B8%8B%E8%BD%BD%E5%AF%B9%E5%BA%94%E7%89%88%E6%9C%ACskywalking-agent"><span class="nav-number">2.0.6.1.</span> <span class="nav-text">1、下载对应版本skywalking-agent</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#2-%E3%80%81%E7%BC%96%E5%86%99Dockerfile"><span class="nav-number">2.0.6.2.</span> <span class="nav-text">2.、编写Dockerfile</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#3%E3%80%81%E6%9E%84%E5%BB%BA%E8%87%AA%E5%AE%9A%E4%B9%89%E9%95%9C%E5%83%8F"><span class="nav-number">2.0.6.3.</span> <span class="nav-text">3、构建自定义镜像</span></a></li></ol></li><li class="nav-item nav-level-3"><a class="nav-link" href="#%E4%BA%94%E3%80%81%E9%97%AE%E9%A2%98%E8%AF%B4%E6%98%8E%EF%BC%9A"><span class="nav-number">2.0.7.</span> <span class="nav-text">五、问题说明：</span></a><ol class="nav-child"><li class="nav-item nav-level-5"><a class="nav-link" href="#%E9%97%AE%E9%A2%98%E4%B8%80"><span class="nav-number">2.0.7.0.1.</span> <span class="nav-text">问题一</span></a><ol class="nav-child"><li class="nav-item nav-level-6"><a class="nav-link" href="#%E5%8E%9F%E5%9B%A0%E5%88%86%E6%9E%90%EF%BC%9A"><span class="nav-number">2.0.7.0.1.1.</span> <span class="nav-text">原因分析：</span></a></li></ol></li><li class="nav-item nav-level-5"><a class="nav-link" href="#%E9%97%AE%E9%A2%98%E4%BA%8C"><span class="nav-number">2.0.7.0.2.</span> <span class="nav-text">问题二</span></a></li><li class="nav-item nav-level-5"><a class="nav-link" href="#JDK%E5%AD%97%E4%BD%93%E7%B1%BB%E5%88%9D%E5%A7%8B%E5%8C%96%E5%BC%82%E5%B8%B8%E9%97%AE%E9%A2%98%EF%BC%9Ajava-lang-NoClassDefFoundError-Could-not-initialize-class-sun-font-SunFontManager"><span class="nav-number">2.0.7.0.3.</span> <span class="nav-text">JDK字体类初始化异常问题：java.lang.NoClassDefFoundError: Could not initialize class sun.font.SunFontManager</span></a></li><li class="nav-item nav-level-5"><a class="nav-link" href="#%E9%97%AE%E9%A2%98%E4%B8%89"><span class="nav-number">2.0.7.0.4.</span> <span class="nav-text">问题三</span></a></li><li class="nav-item nav-level-5"><a class="nav-link" href="#%E9%97%AE%E9%A2%98%E5%9B%9B"><span class="nav-number">2.0.7.0.5.</span> <span class="nav-text">问题四</span></a></li><li class="nav-item nav-level-5"><a class="nav-link" href="#kubesphere%E5%AE%89%E8%A3%85-es%E9%85%8D%E7%BD%AE%E6%96%87%E4%BB%B6"><span class="nav-number">2.0.7.0.6.</span> <span class="nav-text">kubesphere安装|es配置文件</span></a></li></ol></li></ol></li></ol></li><li class="nav-item nav-level-2"><a class="nav-link" href="#Skywalking%E6%93%8D%E4%BD%9C%E8%AF%B4%E6%98%8E"><span class="nav-number">2.1.</span> <span class="nav-text">Skywalking操作说明</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#1%E3%80%81%E8%AE%BF%E9%97%AEskywalking-ui%E9%9D%A2%E6%9D%BF"><span class="nav-number">2.2.</span> <span class="nav-text">1、访问skywalking-ui面板</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#2%E3%80%81%E8%AE%BF%E9%97%AE%E6%BC%94%E7%A4%BA%E6%8E%A5%E5%8F%A3"><span class="nav-number">2.3.</span> <span class="nav-text">2、访问演示接口</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#%E6%97%A5%E5%BF%97%E6%8E%A5%E5%85%A5"><span class="nav-number">2.4.</span> <span class="nav-text">日志接入</span></a></li></ol></li></ol>
    
    </div>
  </aside>


</section>
        
      </div>
      
      <footer id="footer">
  

  <div class="container">
      	<div class="row">
	      <!-- <p> Powered by <a href="http://hexo.io/" target="_blank">Hexo</a> and <a href="https://github.com/iTimeTraveler/hexo-theme-hiker" target="_blank">Hexo-theme-hiker</a> </p> -->
	      <p>May there be no bug in the world！</p>
        <p id="copyRightEn">Copyright &copy; 2022 - 2023 All Rights Reserved.</p>
	      
	      
    		<p class="busuanzi_uv">
				UV : <span id="busuanzi_value_site_uv"></span> |  
				PV : <span id="busuanzi_value_site_pv"></span>
		    </p>
  		   
		</div>

		
  </div>
</footer>


<!-- min height -->

<script>
    var wrapdiv = document.getElementById("wrap");
    var contentdiv = document.getElementById("content");
    var allheader = document.getElementById("allheader");

    wrapdiv.style.minHeight = document.body.offsetHeight + "px";
    if (allheader != null) {
      contentdiv.style.minHeight = document.body.offsetHeight - allheader.offsetHeight - document.getElementById("footer").offsetHeight + "px";
    } else {
      contentdiv.style.minHeight = document.body.offsetHeight - document.getElementById("footer").offsetHeight + "px";
    }
</script>
    </div>
    <!-- <nav id="mobile-nav">
  
    <a href="/qingfeng-blog/" class="mobile-nav-link">首页</a>
  
    <a href="/qingfeng-blog/categories" class="mobile-nav-link">分类</a>
  
    <a href="/qingfeng-blog/tags" class="mobile-nav-link">标签</a>
  
</nav> -->
    

<!-- mathjax config similar to math.stackexchange -->

<script type="text/x-mathjax-config">
  MathJax.Hub.Config({
    tex2jax: {
      inlineMath: [ ['$','$'], ["\\(","\\)"] ],
      processEscapes: true
    }
  });
</script>

<script type="text/x-mathjax-config">
    MathJax.Hub.Config({
      tex2jax: {
        skipTags: ['script', 'noscript', 'style', 'textarea', 'pre', 'code']
      }
    });
</script>

<script type="text/x-mathjax-config">
    MathJax.Hub.Queue(function() {
        var all = MathJax.Hub.getAllJax(), i;
        for(i=0; i < all.length; i += 1) {
            all[i].SourceElement().parentNode.className += ' has-jax';
        }
    });
</script>

<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
</script>


  
<link rel="stylesheet" href="/qingfeng-blog/fancybox/jquery.fancybox.css">

  
<script src="/qingfeng-blog/fancybox/jquery.fancybox.pack.js"></script>




<script src="/qingfeng-blog/js/scripts.js"></script>



  
<script src="/qingfeng-blog/js/home.js"></script>




  
<script src="/qingfeng-blog/js/dialog.js"></script>









	<div style="display: none;">
    <script src="https://s95.cnzz.com/z_stat.php?id=1260716016&web_id=1260716016" language="JavaScript"></script>
  </div>



	<script async src="//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js">
	</script>






  </div>

  <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" style="display: none;">
  <div class="modal-dialog">
    <div class="modal-content">
      <div class="modal-header">
        <h2 class="modal-title" id="myModalLabel">设置</h2>
      </div>
      <hr style="margin-top:0px; margin-bottom:0px; width:80%; border-top: 3px solid #000;">
      <hr style="margin-top:2px; margin-bottom:0px; width:80%; border-top: 1px solid #000;">


      <div class="modal-body">
          <div style="margin:6px;">
            <a data-toggle="collapse" data-parent="#accordion" href="#collapseOne" onclick="javascript:setFontSize();" aria-expanded="true" aria-controls="collapseOne">
              正文字号大小
            </a>
          </div>
          <div id="collapseOne" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingOne">
          <div class="panel-body">
            您已调整页面字体大小
          </div>
        </div>
      


          <div style="margin:6px;">
            <a data-toggle="collapse" data-parent="#accordion" href="#collapseTwo" onclick="javascript:setBackground();" aria-expanded="true" aria-controls="collapseTwo">
              夜间护眼模式
            </a>
        </div>
          <div id="collapseTwo" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingTwo">
          <div class="panel-body">
            夜间模式已经开启，再次单击按钮即可关闭 
          </div>
        </div>

        <div>
            <a data-toggle="collapse" data-parent="#accordion" href="#collapseThree" aria-expanded="true" aria-controls="collapseThree">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;关 于&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a>
        </div>
         <div id="collapseThree" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingThree">
          <div class="panel-body">
            清峰小栈
          </div>
          <div class="panel-body">
            Copyright © 2023 清峰 All Rights Reserved.
          </div>
        </div>
      </div>


      <hr style="margin-top:0px; margin-bottom:0px; width:80%; border-top: 1px solid #000;">
      <hr style="margin-top:2px; margin-bottom:0px; width:80%; border-top: 3px solid #000;">
      <div class="modal-footer">
        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
      </div>
    </div>
  </div>
</div>
  
  <a id="rocket" href="#top" class=""></a>
  <script type="text/javascript" src="/qingfeng-blog/js/totop.js?v=1.0.0" async=""></script>
  
    <a id="menu-switch"><i class="fa fa-bars fa-lg"></i></a>
  
</body>
</html>